﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Text;

public partial class AdminCMS_tab_TagConfig_Fix : System.Web.UI.Page
{
    int mid = 0;
    
    protected void Page_Load(object sender, EventArgs e)
    {
        UIMethod.GetQuery(ref mid, "id");
        if (!IsPostBack)
        {
            DataEntity.tab_TagConfig t = new DataEntity.tab_TagConfig();
            t.Select(mid);
            if (!t.IsEmpty)
            {
                RequestQuery.GetEntityValues(t, form1);
            }
            else { UIMethod.Close(); }
        }
    }

    protected void btn_submit_Click(object sender, EventArgs e)
    {
        DataEntity.tab_TagConfig t = new DataEntity.tab_TagConfig(true);
        RequestQuery.SetEntityValues(t, form1);
        t.Update(mid);

        ArrayList al = new ArrayList();
        al.Add(tag_TagName.Text.Trim());
        new Cache_Tag().Cache_delData(al);

        StringBuilder sb = new StringBuilder();        
        UIMethod.Confirm("修改成功，继续修改吗？", "", "location = 'tab_TagConfig_List.aspx" + sb.ToString() + "';");
    }
}
